Source Code Viewer - Example 3 - CountryNotFoundRuleException

package name.matthewgreet.example3.exception;

/**
 * Exception indicating failure to update a country as its id doesn't exist.  
 */
public class CountryNotFoundRuleException extends Exception {
	private static final long serialVersionUID = -1509358281847539829L;
	
	private int id;
	
	public CountryNotFoundRuleException(int id) {
		super("Country id " + id + " does not exist");
		this.id = id;
	}

	@Override
	public String toString() {
		return "CountryNotFoundRuleException [id=" + id + "]";
	}

	public int getId() {
		return id;
	}
	
}